package com.hwc.demo.springcloud.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hwc.demo.springcloud.entity.Dept;
import com.hwc.demo.springcloud.mapper.DeptMapper;
import com.hwc.demo.springcloud.service.DeptService;

@Service
public class DeptServiceImpl implements DeptService{
	@Autowired
	DeptMapper mapper;
	@Override
	public int add(Dept e) {
		return mapper.insertSelective(e);
	}

	@Override
	public Dept get(Long id) {
		return mapper.selectByPrimaryKey(id);
	}

	@Override
	public List<Dept> list() {
		return mapper.selectAll();
	}
	
}
